<template>
  <div>
    <el-table
      :data="inspectData"
      style="width: 100%"
      border
      :span-method="objectSpanMethod"
    >
      <el-table-column width="90" prop="name"> </el-table-column>
      <el-table-column label="检查部位" width="width">
        <template #default="scope">
          <popover
            v-model="scope.row.popoverIsshow"
            @close="close(scope.row)"
            @checkChange="checkChange(scope.row)"
            @submit="submit(scope.row)"
            :row="scope.row"
          />
        </template>
      </el-table-column>
      <el-table-column prop="prop" label="检查方法" width="width">
        <template #default="scope">
          <div class="flex j-s-b a-c">
            <div>{{ scope.row.methodList || "" }}</div>
            <el-icon
              @click="checkChange(scope.row)"
              class="cu-p"
              v-if="scope.row.methodList"
              ><Edit
            /></el-icon>
          </div>
        </template>
      </el-table-column>
      <el-table-column prop="number" label="嘱托" width="width">
      </el-table-column>
      <el-table-column prop="prop" label="备注" width="width">
        <template #default="scope">
          <el-input v-model="scope.row.name" placeholder=""></el-input>
        </template>
      </el-table-column>
    </el-table>

    <el-form :inline="true" :model="formInline" class="demo-form-inline mt12">
      <el-form-item label="">
        <span class="price"> ¥666 </span>
      </el-form-item>
      <el-form-item label="执行科室">
        <s-select :options="[]" width="100px"></s-select>
      </el-form-item>
      <el-form-item label="执行时间">
        <el-date-picker
          v-model="value1"
          type="datetime"
          placeholder="请选择时间"
        />
      </el-form-item>
    </el-form>
    <el-form :inline="true" :model="formInline" class="demo-form-inline">
      <el-form-item label="申请人">
        <s-select :options="[]" width="100px"></s-select>
      </el-form-item>
      <el-form-item label="申请科室">
        <s-select :options="[]" width="100px"></s-select>
      </el-form-item>
      <el-form-item label="申请时间">
        <el-date-picker
          v-model="value1"
          type="datetime"
          placeholder="请选择时间"
        />
      </el-form-item>
    </el-form>
  </div>
</template>
<script setup lang="ts">
import { tableInspect } from "../dialogHooks";
import { Edit } from "@element-plus/icons-vue";
import popover from "./popover.vue";
const { inspectData, close, submit, cleanr, checkChange, objectSpanMethod } =
  tableInspect();
</script>

<style lang="scss" scoped>
.price {
  font-size: 22px;
  margin-right: 95px;
}
.cu-p {
  cursor: pointer;
}
</style>
